
public class CalenderTask extends Task implements Comparable<CalenderTask> {
	
	private int time;
	private int date;
	
	public CalenderTask(String d, int t, int da){
		super(d); //pass desc to super constructor
		time = t;
		date = da;
	}
	
	public int getTime(){
		return time;
	}
	
	public void setTime(int t){
		time = t;
	}
	
	public int getDate(){
		return date;
	}
	
	public void setDate(int d){
		date = d;
	}

	@Override
	public int compareTo(CalenderTask otherTask) {
		if(date>otherTask.date){
			return 1;
		}
		if(date<otherTask.date){
			return -1;
		}
		if(time>otherTask.time){
			return 1;
		}
		if(time<otherTask.time){
			return -1;
		}
		return 0;
	}

	@Override
	public int getValue() {
		return date;
	}

}
